

const initialState = {
    text: '0'
    }
    export const reducer = (state = initialState, action) => {

switch (action.type) {
    case 'ADD':
        return {
            text: Number(state.text)-1
        }
    case 'DEL':
        return {
            text: Number(state.text)+1
        }
    default:
        return initialState;
}
}
//export default reducer